﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BacteriaSimulation.Simulation
{
    public class SimulationPoint
    {
        public Double X { get; set; }
        public Double Y { get; set; }

        public SimulationPoint(Double x, Double y)
        {
            this.X = x;
            this.Y = y;
        }

        public SimulationPoint Clone()
        {
            return new SimulationPoint(this.X, this.Y);
        }

        public static Double Distance(SimulationPoint a, SimulationPoint b)
        {
            Double distance = Math.Sqrt( Math.Pow( (a.X - b.X), 2) + Math.Pow((a.Y - b.Y), 2));
            return distance;
        }

        public static Double SquareDistance(SimulationPoint a, SimulationPoint b)
        {
            Double square = Math.Pow((a.X - b.X), 2) + Math.Pow((a.Y - b.Y), 2);
            return square;
        }
    }
}
